package com.vsen.lpr.mapper;

import com.vsen.lpr.entity.ProductInfo;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品信息表 Mapper 接口
 * </p>
 *
 * @author yy
 * @since 2021-08-04
 */
@Mapper
public interface ProductInfoMapper extends BaseMapper<ProductInfo> {

    List<ProductInfo> selectByTypeId(@Param("typeId") Integer typeId);

    ProductInfo selectByProductId(@Param("productId") Integer productId);

    Integer countStockAndAddSales(@Param("productId")Integer productId,@Param("num") Integer num);
}
